package com.szh.cloud.spring.util;

import org.springframework.util.DigestUtils;

public final class Md5Util {
    private Md5Util(){}
    private static String passwdKey = "abc123456abc";

    public static String encode(String rawPassword){
        return DigestUtils.md5DigestAsHex((rawPassword + passwdKey).getBytes());
    }

    public static void main(String[] args) {

        System.out.println("md5:" + encode("a123456"));
    }

}
